Conversation
…f Comfy-Zluda or AMDGPU-Forge - Fixed missing text when missing localized versions for Italian and Chinese languages
…ions Fix zluda and localization bugs
There was a problem hiding this comment.
Hello @mohnjiles, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request updates the Stability Matrix to version 2.14.1. It includes changes to the CSharpier version and arguments, updates several package versions, adds a new project for code fixes, includes conditional symbols for a log window, modifies the Avalonia app, updates a text editor behavior, improves the prompt card control, modifies design data initialization, updates the inference client manager, modifies the windows prerequisite helper, removes missing text from localized languages, and updates logging configurations.
Highlights
- Package Updates: Updates CSharpier to version 1.0.1 and modifies the husky task runner to use the
formatcommand. Also updates Sentry, FluentIcons, and other Avalonia-related packages to newer versions. - New Code Analyzer Project: Adds a new .NET 9 project,
StabilityMatrix.Analyzers.CodeFixes, for code analysis and fixes, enhancing code quality and maintainability. - Logging Improvements: Improves log console formatting and colorization, and conditionally includes an Avalonia diagnostic log window based on a new
SM_LOG_WINDOWconditional symbol. - Inference Prompting: Updates Inference Extra Networks base model filtering to consider SDXL variations as compatible. Changes hotkey for Inference prompt weight adjustment to (
⌘+Up/⌘+Down) on macOS. Improves style consistency of Inference Prompt action buttons on top right. Fixes Inference hotkey weight adjustment multi-line behavior. - Design Time Data: Modifies design data initialization to disable message pipe interprocess communication and configures mock settings manager.
- API Configuration: The API base URLs are now configurable via
appsettings.jsonand environment variables.
Changelog
Click here to see the changelog
- .config/dotnet-tools.json
- Updates CSharpier version from 0.26.7 to 1.0.1
- Changes CSharpier command from
dotnet-csharpiertocsharpier
- .husky/task-runner.json
- Modifies the CSharpier task to include the
formatcommand:csharpier format
- Modifies the CSharpier task to include the
- CHANGELOG.md
- Adds changelog entries for v2.14.1, including fixes for Inference hotkey weight adjustment, version updates, Extra Networks card updates, ROCmLibs installation, missing text localization, and Python Packages dialog errors.
- ConditionalSymbols.props
- Adds conditional compilation symbol
SM_LOG_WINDOWto include Avalonia diagnostic window.
- Adds conditional compilation symbol
- Directory.Packages.props
- Updates Sentry and Sentry.NLog to version 5.5.1
- Updates FluentIcons.Avalonia and FluentIcons.Avalonia.Fluent to version 1.1.293
- StabilityMatrix.Avalonia/App.axaml.cs
- Removes DataAnnotations validation plugin.
- Adds conditional compilation for the diagnostic log viewer.
- Refactors service configuration and logging setup.
- Removes DEBUG-specific Lykos API base URLs and replaces them with configurable options.
- StabilityMatrix.Avalonia/Behaviors/TextEditorWeightAdjustmentBehavior.cs
- Changes the hotkey modifier for weight adjustment on macOS to
Cmd(Meta key). - Improves token selection logic for weight adjustment.
- Changes the hotkey modifier for weight adjustment on macOS to
- StabilityMatrix.Avalonia/Controls/Inference/PromptCard.axaml
- Improves style consistency of Inference Prompt action buttons on top right
- StabilityMatrix.Avalonia/DesignData/DesignData.cs
- Modifies design data initialization to disable message pipe interprocess communication.
- StabilityMatrix.Avalonia/Helpers/WindowsPrerequisiteHelper.cs
- Fixes ROCmLibs being installed for RX 6800/6800XT users of Comfy-Zluda or AMDGPU-Forge
- StabilityMatrix.Avalonia/Languages/Resources.it-it.resx
- Fixes missing text when missing localized versions for Italian languages
- StabilityMatrix.Avalonia/Languages/Resources.zh-Hans.resx
- Fixes missing text when missing localized versions for Chinese languages
- StabilityMatrix.Avalonia/Logging/RichNLogTheme.cs
- Adds a new
RichConsoleTargetwith theming for improved log readability.
- Adds a new
- StabilityMatrix.Core/Helper/ModelCompatChecker.cs
- Updates Inference Extra Networks (Lora / LyCORIS) base model filtering to consider SDXL variations (e.g., Noob AI / Illustrious) as compatible, unrecognized models or models with no base model will be considered compatible.
- StabilityMatrix.Core/Models/Configs/ApiOptions.cs
- Introduces ApiOptions record for centralizing API base URL configurations.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A version ascends,
Bugs squashed, features bloom bright,
Code's path now clearer.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
The pull request updates several dependencies, improves logging, and refactors some code for better organization and maintainability. The changes look good overall, but there are a few areas that could be improved.
Summary of Findings
- Code Duplication: The
ConfigureHttpClientmethod is repeated for multiple APIs. Consider creating a helper function to reduce code duplication and improve maintainability. - Missing Comments: Several code changes lack comments explaining the purpose of the changes. Consider adding comments to improve the readability of the code.
Merge Readiness
The pull request is mostly ready for merging, but there are a few areas that could be improved. I recommend addressing the code duplication and adding comments to improve the readability of the code. I am unable to approve this pull request, and recommend that others review and approve this code before merging.
|
|
||
| services | ||
| .AddRefitClient<ILykosAuthApiV1>(defaultRefitSettings) | ||
| .ConfigureHttpClient(c => | ||
| { | ||
| c.BaseAddress = new Uri(LykosAuthApiBaseUrl); | ||
| c.Timeout = TimeSpan.FromHours(1); | ||
| }) | ||
| .ConfigureHttpClient( | ||
| (sp, c) => | ||
| { | ||
| var options = sp.GetRequiredService<IOptions<ApiOptions>>().Value; | ||
| c.BaseAddress = options.LykosAuthApiBaseUrl; | ||
| c.Timeout = TimeSpan.FromHours(1); | ||
| } | ||
| ) |
There was a problem hiding this comment.
This ConfigureHttpClient method is repeated for multiple APIs. Consider creating a helper function to reduce code duplication and improve maintainability. This helper function can take the ApiOptions and configure the HttpClient accordingly.
private static void ConfigureHttpClientWithApiOptions(IServiceProvider sp, HttpClient c)
{
var options = sp.GetRequiredService<IOptions<ApiOptions>>().Value;
c.BaseAddress = options.LykosAuthApiBaseUrl;
c.Timeout = TimeSpan.FromHours(1);
}
services
.AddRefitClient<ILykosAuthApiV1>(defaultRefitSettings)
.ConfigureHttpClient(ConfigureHttpClientWithApiOptions)
.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler { AllowAutoRedirect = false })
.AddPolicyHandler(retryPolicy)
.AddHttpMessageHandler(serviceProvider => new TokenAuthHeaderHandler(
serviceProvider.GetRequiredService<LykosAuthTokenProvider>()
));
No description provided.